import request from "@/utils/request";

// 查询代理人列表
export function listAgent(query) {
  return request({
    url: "/cancel/agent/list",
    method: "get",
    params: query,
  });
}

// 是否通过审核
export function checkAgent(data) {
  return request({
    url: "/cancel/agent/auditing",
    method: "post",
    data: data,
  });
}

//提现列表
export function listWithDraw(query) {
  return request({
    url: "/cancel/agentWithDraw/list",
    method: "get",
    params: query,
  });
}
// 是否通过审核
export function withDrawPrice(data) {
  return request({
    url: "/cancel/agentWithDraw/withDrawPrice",
    method: "post",
    data: data,
  });
}
//订单购买详情
export function bankOrder(data) {
  return request({
    url: "/cancel/agent/bankOrder",
    method: "post",
    data: data,
  });
}
//申请提现记录
export function withDrawLog(data) {
  return request({
    url: "/cancel/agent/withDrawLog",
    method: "post",
    data: data,
  });
}
//汇总统计
export function showAgentOrderData(query) {
  return request({
    url: "/cancel/agentWithDraw/showAgentOrderData",
    method: "get",
    params: query,
  });
}
// 代理商列表
export function agentDLList(query) {
  return request({
    url: "/cancel/agent/agentDLList",
    method: "get",
    params: query,
  });
}
// 添加代理商
export function addAgentDLagentDL(data) {
  console.log(data, "data");
  return request({
    url: "/cancel/agent/addAgentDL",
    method: "post",
    data,
  });
}
// 代理商查询
export function queryAgentDL(id) {
  return request({
    url: "/cancel/agent/query/" + id,
    method: "get",
  });
}
// 修改代理商
export function editAgentDLagentDL(data) {
  return request({
    url: "/cancel/agent/edit",
    method: "put",
    data,
  });
}
// 获取代理商等级列表
export function showAgentLevel(query) {
  return request({
    url: "/cancel/agentLevel/showAgentLevel",
    method: "get",
    params: query,
  });
}
// 代理人等级列表分页
export function getAgentList(query) {
  return request({
    url: "/cancel/agentLevel/list",
    method: "get",
    params: query,
  });
}
// 添加代理人等级
export function addAgentLevel(data) {
  return request({
    url: "/cancel/agentLevel/addAgentLevel",
    method: "post",
    data,
  });
}
// 查询
export function detailLevel(id) {
  return request({
    url: "/cancel/agentLevel/" + id,
    method: "get",
  });
}
// 修改代理人等级
export function editAgentLevel(data) {
  return request({
    url: "/cancel/agentLevel/edit",
    method: "put",
    data,
  });
}
// 获取小程序码
export function createAgentCode(data) {
  return request({
    url: "/cancel/agent/createAgentCode",
    method: "post",
    data,
  });
}
// 提现
export function txPrice(data) {
  return request({
    url: "/cancel/agentWithDraw/txPrice",
    method: "post",
    data,
  });
}
// 提现列表
export function agentTxList(query) {
  return request({
    url: "/cancel/agentWithDraw/agentTxList",
    method: "get",
    params: query,
  });
}
// 等级变更列表
export function levelLogs(query) {
  return request({
    url: "/cancel/agent/levelLogs",
    method: "get",
    params: query,
  });
}
// 佣金订单记录
export function agentOrder(data) {
  return request({
    url: "/cancel/agent/agentCommissionOrder",
    method: "post",
    data,
  });
}
